package com.hgy.carsb.entity;

import lombok.Data;

import java.math.BigDecimal;

@Data
public class ProfitTotalDetail {
    private String thisMonth;
    private String lastMonth;
    private String subMonth;
    private String thisYearSum;
    private String lastYearSum;
    private String subYear;
    public ProfitTotalDetail(String thisMonth, String lastMonth, String thisYearSum, String lastYearSum){
        this.thisYearSum = thisYearSum;
        this.lastYearSum = lastYearSum;
        this.thisMonth = thisMonth;
        this.lastMonth = lastMonth;
        this.subMonth = new BigDecimal(thisMonth).subtract(new BigDecimal(lastMonth)).toString();
        this.subYear = new BigDecimal(thisYearSum).subtract(new BigDecimal(lastYearSum)).toString();
    }
}
